package com.grts.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import com.grts.dao.t_studentMapper;
import com.grts.pojo.t_student;
import com.grts.service.SearchService;
/**
 * 
 * @ClassName:       SearchServiceImpl
 * @Description:    TODO
 * @author:          杨浩
 * @date:            2018年4月5日        下午4:27:12
 */
@Service
public class SearchServiceImpl implements SearchService{
 
	@Autowired
	private t_studentMapper mapper;
	/**
	 *查询所有的学生
	 */
	@Override
	public List<t_student> findAllStudent() {
		List<t_student> students=mapper.selectAll();
		return students;
	}
	/**
	 * 通过学生的id查询
	 */
	@Override
	public t_student findStudent(int id) {
		t_student student=mapper.selectByPrimaryKey(id);
		return student;
	}
	/**
	 * 通过系部的名称查询
	 */
	@Override
	public List<t_student> searchByDept(String deptName) {
		List<t_student> students=mapper.searchByDept(deptName);
		return students;
	}
	@Override
	public List<t_student> searchDay(Integer day) {
		List<t_student> students=mapper.searchDay(day);
		return students;
	}
	@Override
	public List<t_student> searchLength(Integer length) {
		List<t_student> students=mapper.searchLength(length);
		return students;
	}
	@Override
	public List<t_student> searchStudentByMajor(Integer mid) {
		List<t_student> students=mapper.searchStudentByMajor(mid);
		return students;
	}
	
	
	

}
